fix spec

Andrew Cantino 9 years ago
parent
commit
8463ca0d6b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/agents/java_script_agent.rb

+ 1 - 1
app/models/agents/java_script_agent.rb

@@ -135,7 +135,7 @@ module Agents
135 135
     end
136 136
 
137 137
     def credential_referenced_by_code
138
-      interpolated['code'].strip =~ /\Acredential:(.*)\Z/ && $1
138
+      (interpolated['code'] || '').strip =~ /\Acredential:(.*)\Z/ && $1
139 139
     end
140 140
 
141 141
     def setup_javascript